size = int(input("请输入三角形长度："))
# 左下
print("左下：")
i = 1
while i <= size:
    print("*" * i)
    i += 1

# 右下
print("右下：")
i = 1
while i <= size:
    print(" " * (size - i) + "*" * i)
    i += 1

# 左上
print("左上：")
i = size
while i >= 1:
    print("*" * i)
    i -= 1

# 右上
print("右上：")
i = size
while i >= 1:
    print(" " * (size - i) + "*" * i)
    i -= 1
